#ifndef STARTWINDOW_H
#define STARTWINDOW_H

#include <QtGui>
#include "recmsgthread.h"

#ifdef _cplusplus
extern "C" {
#endif

#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>

#ifdef _cplusplus
}
#endif

class StartWindow : public QDialog
{
    Q_OBJECT

public:
    StartWindow(QWidget *parent = 0);
    ~StartWindow();
    QLabel *chatWithLabel;
    QLineEdit *ipAddress;
    QPushButton *startChatButton;
    QHBoxLayout *lowerLayout;
    QVBoxLayout *mainLayout;
    RecMsgThread recMsgThread;
    QMenuBar *menuBar;
    QMenu *fileMenu;
    QMenu *helpMenu;
    QAction *exit;
    QAction *about;
    QList<ip_window_list> sessionList;

public slots:
    void startChatClicked();
    void newMsgArrived(struct sockaddr_in incoming_info, char *msg);
    void exitClicked();
    void aboutClicked();
};

#endif // STARTWINDOW_H
